home *** CD-ROM | disk | FTP | other *** search
-
- package sub_arctic.test;
-
- /* import various pieces of the sub_arctic toolkit that we need */
- import sub_arctic.lib.*;
- import sub_arctic.input.*;
- import sub_arctic.constraints.std_function;
-
- public class cycle_test extends interactor_applet
- implements interactor_consts {
-
- /* initialization of sub_arctic interface when applet starts */
- public void build_ui(base_parent_interactor top)
- {
- button goodbye;
-
- goodbye = new button(0,0, "Goodbye", null);
- top.add_child(goodbye);
-
- /* build a cycle */
- goodbye.set_x_constraint(std_function.offset(PARENT.W(), 1));
- goodbye.parent().set_w_constraint(
- std_function.offset(FIRST_CHILD.X2(),1));
-
- /* force cyclic eval */
- System.err.print("Cycle (should ignore)=>");
- System.err.println(goodbye.x());
-
- /* reset handling and do it again */
- manager.handle_cycles_with(manager.EXCEPTION_PRINT_STACK);
- goodbye.mark_x_ood();
- System.err.println("(should print stack trace)");
- System.err.print("Cycle =>");
- System.err.println(goodbye.x());
-
- /* reset handling and do it again */
- manager.handle_cycles_with(manager.EXCEPTION_STACK_CRASH);
- goodbye.mark_x_ood();
- System.err.println("(should print stack trace and exit)");
- System.err.print("Cycle =>");
- System.err.println(goodbye.x());
- }
- }
-
- /*=========================== COPYRIGHT NOTICE ===========================
-
- This file is part of the subArctic user interface toolkit.
-
- Copyright (c) 1996 Scott Hudson and Ian Smith
- All rights reserved.
-
- The subArctic system is freely available for most uses under the terms
- and conditions described in
- http://www.cc.gatech.edu/gvu/ui/sub_arctic/sub_arctic/doc/usage.html
- and appearing in full in the lib/interactor.java source file.
-
- The current release and additional information about this software can be
- found starting at: http://www.cc.gatech.edu/gvu/ui/sub_arctic/
-
- ========================================================================*/
-